﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using MyWCF.Demo.Services.Calculator;

namespace MyWCF.Demo.Hosting.ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            using (ServiceHost serviceHost = new ServiceHost(typeof(CalculatorService)))
            {
                serviceHost.Opened += delegate
                {
                    Console.Write("CalculatorService 服务启动！");
                };
                serviceHost.Open();
                Console.Read();
            }
        }
    }
}
